Adding support for MacOs#3
Open
rwaal wants to merge 10 commits intostefanstranger:masterfrom
rwaal:master
Open
Adding support for MacOs#3rwaal wants to merge 10 commits intostefanstranger:masterfrom rwaal:master
rwaal wants to merge 10 commits intostefanstranger:masterfrom
rwaal:master
Conversation
Instructions have been added for MacOs. To keep the README.md file uncluttered, I've moved the prerequisites installation to a separate markdown file.
Removing Out-GridView as it's not cross platform. This change allows the code to work on all PowerShell 7 compatible platforms.
Context will be set using the variable $SubscriptionId, in which user manually entered the subscription Id. Necessary because the Out-Gridview was removed in a previous commit.
Setting the environment variables in the original script doesn't work on MacOs. Instead, a local.settings.json file is used. It provides the same capabilities; storing app settings that the local core tools will use.
The original tasks do not run on macos. These additions are automatically used on macos systems and will run the alternative command.
Local settings should be committed to source control. Especially because there will probably be secrets inside of these files.
This was placed before the local.settings.json was in .gitignore and should not have been committed. And for those interested, the SPN is long gone and cannot be used ;-)
| [Environment]::SetEnvironmentVariable("AIPASResourceGroupName", $ResourceGroupName, "User") | ||
| [Environment]::SetEnvironmentVariable("AIPASStorageAccountName", $StorageAccountName, "User") | ||
| # Restart VSCode to have access to the environment variables | ||
| #region create local settings file |
Owner
There was a problem hiding this comment.
Hi @rwaal
For running the Pester tests located in the IPAM PowerShell Module environment variables are used. So these still need to be created on your local development machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for MacOs for the AIPAS IPAM solution.
Changes
Most notable changes are in the README file:
Out-GridViewis Windows-only, so needed to be replaced. I realise that manually entering a subscriptionId is not as elegant as usingOut-GridView, but this at least works on all systems.local.settings.jsonfile, which will work on all supported OS'es, and is a common way to store app settings for local development.tasks.jsonfile:"osx"commands will automatically be executed on a MacOs system.